package cn.edu.scau.cmi.carol.client;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;


public class Client {
	public static void main(String[] args)throws ClassNotFoundException,SQLException{
		Class.forName("com.mysql.jdbc.Driver");
		String url="jdbc:mysql://localhost:3306/jsp";
		String username="root";
		String password="root";
		Connection conn=DriverManager.getConnection(url, username, password);
		
		String insertSqlStatic="insert into tb_student(age,sex,name,id) values('21','1','Lily','1')";
		Statement s=conn.prepareStatement(insertSqlStatic);
				
		int row=s.executeUpdate(insertSqlStatic);
		if(row>0) {
		System.out.print("OK");
		}
		s.close();
		conn.close();
	}

}
